package cn.qingyun.gis.modules.enterprise.controller;


import cn.qingyun.gis.common.Result;
import cn.qingyun.gis.modules.enterprise.request.BuildingRequest;
import cn.qingyun.gis.modules.enterprise.service.ILayerDataService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author skb
 * @since 2024-04-07
 */
@RestController
@RequestMapping("/layer")
public class LayerDataController {

    @Autowired
    private ILayerDataService layerDataService;

    @ApiOperation("获取图层数据")
    @PostMapping("/list")
    public Result<?> getLayerList(@RequestBody BuildingRequest buildingRequest){
        return Result.okData(layerDataService.getLayerList(buildingRequest));
    }

    @ApiOperation("获取资管小区数据")
    @GetMapping("/ziguan")
    public Result<?> getLayerList(@RequestParam String code){
        return Result.okData(layerDataService.getZiGuanList(code));
    }

}
